package com.huobao.yunying.adapters;

import com.huobao.yunying.activitys_hehuoren.Act_Huiyuan_detail;
import com.huobao.yunying.entity.HuiyuanList;
import com.huobao.zhangying.R;

import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;
import joanzapata.android.BaseAdapterHelper;
import joanzapata.android.QuickAdapter;

public class Adapter_Huiyaun_List extends QuickAdapter<HuiyuanList>{

	public Adapter_Huiyaun_List(Context context) {
		super(context, R.layout.item_huiyuan_list);
	}

	@Override
	protected void convert(BaseAdapterHelper helper, final HuiyuanList data) {
		helper.setText(R.id.tv_name, data.real_name).setText(R.id.tv_tel, data.phone_mob).setOnClickListener(R.id.tv_detail, new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(context, Act_Huiyuan_detail.class);
				intent.putExtra("user_id", data.user_id);
				context.startActivity(intent);
			}
		});
	}

	@Override
	public boolean isEnabled(int position) {
		return false;
	}
}
